﻿<extend name="Public/Common/base.html" />
<block name="main">
<style>
.layui-form-label {
	width: 110px !important;
}
</style>
<css href="__PUBLIC__/layui/css/layui.css" media="all" />

<form class="layui-form" action="{$url}" method="post">
	<input type="hidden" name="id" value="<notempty name="editlist.id">{$editlist.id}
	</notempty>">
	<div class="layui-form-item">
		<label class="layui-form-label">姓名：</label>
		<div class="layui-input-block">
			<input type="text" name="name" lay-verify="name" value="<notempty name="editlist.name">{$editlist.name}</notempty>" autocomplete="off" placeholder="请输入姓名" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">邮箱:</label>
		<div class="layui-input-block">
			<input type="text" name="email" lay-verify="email" value="<notempty name="editlist.email">{$editlist.email}</notempty>" autocomplete="off" placeholder="请输入邮箱" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">手机:</label>
		<div class="layui-input-block">
			<input type="tel" name="phone" lay-verify="phone" value="<notempty name="editlist.phone">{$editlist.phone}</notempty>" autocomplete="off" placeholder="请输入手机" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">性别：</label>
		<div class="layui-input-block">
			<input type="radio" name="sex" value="1" title="男"
			<eq name="editlist.sex" value="1">checked</eq>
			checked> <input type="radio" name="sex" value="0" title="女"
			<eq name="editlist.sex" value="0">checked</eq>
			>
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">工作岗位：</label>
		<div class="layui-input-block">
			<select name="station_id" id="station_id" lay-verify="required">
				<option value="">请选择</option>
				<volist name="stationlist" id="vo">
				<option value="{$vo.station_id}"<eq
						name="vo.station_id" value="$editlist.station_id">selected</eq>>{$vo.station}
				</option>
				</volist>
			</select>
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">工资：</label>
		<div class="layui-input-block">
			<input type="number" name="salary" lay-verify="required" value="<notempty name="editlist.salary">{$editlist.salary}</notempty>" autocomplete="off" placeholder="请输入工资" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">是否有社保</label>
		<div class="layui-input-block">
			<compare name="editlist.social" value="0" type="gt"> <input
				type="radio" name="soc" id="yes" value="1" title="有" checked
				lay-filter="yes"> <input type="radio" name="soc" id="no"
				value="0" title="无" lay-filter="no"> <else /> <input
				type="radio" name="soc" id="yes" value="1" title="有"
				lay-filter="yes"> <input type="radio" name="soc" id="no"
				value="0" title="无" checked lay-filter="no"> </compare>

		</div>
	</div>

	<compare name="editlist.social" value="0" type="gt">
	<style>
.am-hinden {
	display: block;
}
</style>
	<else />
	<style>
.am-hinden {
	display: none;
}
</style>
	</compare>

	<div class="layui-form-item am-hinden">
		<label class="layui-form-label">社保费：</label>
		<div class="layui-input-block">
			<input type="number" name="social" value="<notempty name="editlist.social">{$editlist.social}</notempty>" autocomplete="off" placeholder="请输入社保费" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<div class="layui-input-block">
			<button class="am-btn am-btn-primary" lay-submit="submit">{$info}</button>
		</div>
	</div>

</form>

<js href="__PUBLIC__/layui/layui.js" media="all" /> <script>
layui.use(['form'], function(){
  var form = layui.form()
  ,layer = layui.layer  
  form.verify({
    name: function(value){
        if(value === ""){
        	return "姓名不能为空！";
        } 
        if(value.length < 2){
            return '姓名至少得2个字符啊';
          }
       
      },             
  });  
  
  form.on('radio(yes)', function(data){
	  if(this.checked==true){
		   $('.am-hinden').css('display','block'); 
	  }	
	  });
  form.on('radio(no)', function(data){
	  if(this.checked==true){
		   $('.am-hinden').css('display','none'); 
	  }	
	  });
    
});
</script> </block>